<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rượu</title>
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery-1.6.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>  
<script type="text/javascript" src="js/Forum_400.font.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/tms-0.3.js"></script>
<script type="text/javascript" src="js/tms_presets.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/atooltip.jquery.js"></script> 
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>

<body id="page1">
<center>
	<?php
		@ $con = mysql_pconnect('localhost', 'root', '');
											
		@ $nameCookie = $_COOKIE['cafe'];
							
		@ $cmnd = $_POST['cmnd'];
		@ $matkhau = $_POST['matkhau'];
		@ $matkhau = hash("sha512", $matkhau);
										
		if (!$con)
		{
			die('Could not connect: ' . mysql_error());
		}
										
		@ mysql_set_charset('utf8');
		@ mysql_select_db('cafe');
							
		$query = "SELECT * FROM `cookie` c WHERE c.cookie = '".$nameCookie."'";
		$result = mysql_query($query) or die('Error, query failed');
		$row = mysql_fetch_array($result);
		$log = stripslashes($row['log']);
							
		if( $log == 1 )
		{	
			if (isset($_COOKIE["cafe"]))
			{						
				$query = "SELECT * FROM `taikhoan` t INNER JOIN `cookie` c ON t.cmnd = c.cmnd WHERE c.cookie = '".$nameCookie."'";
				$result = mysql_query($query) or die('Error, query failed');
												
				if( mysql_num_rows($result) != 0 )
				{
					$row = mysql_fetch_array($result);
											
					$cmnd = stripslashes($row['cmnd']);
					echo "Chào ".$cmnd;
											
					if( stripslashes($row['loai']) == 1 )
					{
						$link = "../menu/chuquan.php";
					}
					else if ( stripslashes($row['loai']) == 2 )
					{
						$link = "../menu/quanly.php";
					}
					else if ( stripslashes($row['loai']) == 3 )
					{
						$link = "../menu/phucvu.php";
					}
					else if ( stripslashes($row['loai']) == 4 )
					{
						$link = "../menu/nhabep.php";
					}
					echo "&nbsp&nbsp&nbsp<a href='$link'>"."Trang tài khoản"."</a>";
					echo "&nbsp&nbsp&nbsp<a href='../login/doimatkhau.php'>"."Đổi mật khẩu"."</a>";
					echo "&nbsp&nbsp&nbsp<a href='../login/deletecookie.php'>"."Đăng xuất"."</a>";
				}
				else
				{
					echo "<a href='../login/dangnhap.php'>"."Đăng nhập"."</a>";
				}
			}
			else
			{
				echo "<a href='../login/dangnhap.php'>"."Đăng nhập"."</a>";
			}
		}
		else
		{
			echo "<a href='../login/dangnhap.php'>"."Đăng nhập"."</a>";
    	}
    ?>
    <div class="body6">
        <div class="body1">
            <div class="body5">
                <div class="main">
                    <header>
                    	<h1><a href="home.php" id="logo">5PM Cafe</a></h1>
                    	<nav>
                    		<ul id="top_nav">
                    			<li><a href="home.php"><img src="images/icon_1.gif" alt=""></a></li>
                    			<li><a href="#"><img src="images/icon_2.gif" alt=""></a></li>
                    			<li class="end"><a href="Contacts.php"><img src="images/icon_3.gif" alt=""></a></li>
                    		</ul>
                    	</nav>
                    	<nav>
                    		<ul id="menu">
                    			<li><a href="home.php">Nhà Hàng</a></li>
                    			<li><a href="Cuisine.php">Am Thuc</a></li>
                    			<li><a href="Wine.php">Ruou</a></li>
                    			<li><a href="CookBook.php">Hoc Nau An</a></li>
                    			<li><a href="Contacts.php">Gop Y</a></li>
                    		</ul>
                    	</nav>
                    </header><div class="ic">More Website Templates  @ TemplateMonster.com - August 1st 2011!</div>
                </div>
            </div>
        </div>
    </div>
<!-- InstanceBeginEditable name="body content" -->
<div class="body6">
	<div class="body1">
		<div class="main">
<!-- content -->
			<article id="content">
				<div class="wrap">
					<section class="cols">
						<div class="box">
							<div>
								<span style="font-size:41px;line-height:1.2em;color:#55FFFF;padding:16px 0 12px 0;letter-spacing:-2px">Nguyện Liệu</span>
								<figure><img src="images/page3_img1.jpg" alt="" ></figure>
								<p class="pad_bot1">Nguyên liệu là thứ rất cần thiết để tạo nên những sản phẩm rượu đậm chất quý tộc. Nguyên liệu ngon - Rượu mới ngon.</p>
								<a href="#" class="button1">Xem Thêm</a>
							</div>
						</div>
					</section>
					<section class="cols pad_left1">
						<div class="box">
							<div>
								<span style="font-size:41px;line-height:1.2em;color:#55FFFF;padding:16px 0 12px 0;letter-spacing:-2px">Khai Rượu</span>
								<figure><img src="images/page3_img2.jpg" alt="" ></figure>
								<p class="pad_bot1">Trước khi thưởng thức rượu, sự chuẩn bị là hết sức cần thiết. Với một tâm hồn bình yên thì những giọt rượu sẽ trở nên ngon hơn.</p>
								<a href="#" class="button1">Mẹo cho Bạn</a>
							</div>
						</div>
					</section>
					<section class="cols pad_left1">
						<div class="box">
							<div>
								<span style="font-size:41px;line-height:1.2em;color:#55FFFF;padding:16px 0 12px 0;letter-spacing:-2px">Độc Quyền Rượu</span>
								<figure><img src="images/page3_img3.jpg" alt="" ></figure>
								<p class="pad_bot1">Chúng tôi tự hào khi nói rằng, những chai rượu của nhà hàng được chiết suất trực tiếp từ vườn của nhà hàng chúng tôi. Và không nơi đâu có được.</p>
								<a href="#" class="button1">Xem Thêm</a>
							</div>
						</div>
					</section>
				</div>
			</article>
		</div>
	</div>
</div>
<div class="body2">
	<div class="main">
		<article id="content2">
			<div class="wrapper">
				<section class="pad_left1">
					<div class="wrapper">
						<div class="cols">
							<span style="font-size:41px;line-height:1.2em;color:#000000;padding:16px 0 12px 0;letter-spacing:-2px">Giao Hàng Tận Nơi</span>
						</div>
						<div class="col3 pad_left1">
							<span style="font-size:41px;line-height:1.2em;color:#000000;padding:16px 0 12px 0;letter-spacing:-2px">Danh Sách Rượu</span>
						</div>
					</div>
					<div class="line1">
						<div class="wrapper line2">
							<div class="cols">
								<div class="wrapper pad_bot1">
									<figure class="pad_bot1"><img src="images/page3_img4.jpg" alt=""></figure>
									Chúng tôi cam kết sẽ giao hàng tận nơi cho quý khách ở bất kỳ nơi đâu trên toàn thế giới.
								</div>
							</div>
							<div class="cols pad_left1">
								<div class="col2">
									<ul class="price">
										<li><a href="#">Rượu Nho</a><span>$15</span></li>
										<li><a href="#">Rượu Táo</a><span>$23</span></li>
										<li><a href="#">Rượu Đào</a><span>$57</span></li>
										<li><a href="#">Rượu Vang</a><span>$47</span></li>
										<li><a href="#">Rượu Vodka</a><span>$87</span></li>
										<li><a href="#">Rượu Whisky</a><span>$12</span></li>
										<li><a href="#">Rượu Rum</a><span>$33</span></li>
										<li><a href="#">Champagne</a><span>$78</span></li>
									</ul>
								</div>
							</div>
							<div class="col2 pad_left1">
								<ul class="price">
									<li><a href="#">Rượu Nho</a><span>$15</span></li>
									<li><a href="#">Rượu Táo</a><span>$23</span></li>
									<li><a href="#">Rượu Đào</a><span>$57</span></li>
									<li><a href="#">Rượu Vang</a><span>$47</span></li>
									<li><a href="#">Rượu Vodka</a><span>$87</span></li>
									<li><a href="#">Rượu Whisky</a><span>$12</span></li>
									<li><a href="#">Rượu Rum</a><span>$33</span></li>
									<li><a href="#">Champagne</a><span>$78</span></li>
								</ul>
							</div>
						</div>
					</div>
				</section>
			</div>
		</article>
<!-- / content -->
	</div>
</div>
<!-- InstanceEndEditable -->
<div class="body3">
	<div class="body4">
		<div class="main">
<!-- footer -->
			<footer>
				<div class="wrapper">
					<section class="col1 pad_left1">
						<span style="font-size:27px;color:#230000;line-height:1.2em;padding:20px 0 9px 0;letter-spacing:-1px">Liên Hệ Miễn Phí: </br>(+84) 12 0303 6166</span></br>
						<a rel="nofollow" href="home.php" target="_blank">Bản quyền thuộc về</a> 5PM Team
					</section>
					<section class="col2 pad_left1">
						<h3>Theo Dõi 5PM Cafe </h3>
						<ul id="icons">
							<li><a href="#" class="normaltip" title="Facebook"><img src="images/icon1.gif" alt=""></a></li>
							<li><a href="#" class="normaltip" title="Linkedin"><img src="images/icon2.gif" alt=""></a></li>
							<li><a href="#" class="normaltip" title="Twitter"><img src="images/icon3.gif" alt=""></a></li>
							<li><a href="#" class="normaltip" title="Delicious"><img src="images/icon4.gif" alt=""></a></li>
							<li><a href="#" class="normaltip" title="Technorati"><img src="images/icon5.gif" alt=""></a></li>
						</ul>
					</section>
				</div>
				<!-- {%FOOTER_LINK} -->
			</footer>
<!-- / footer -->
		</div>
	</div>
</div>
<script type="text/javascript"> Cufon.now(); </script>
</center>
</body>
<!-- InstanceEnd --></html>